package com.jinke.api.modules.third.ezeeship.model.response;

import com.jinke.api.modules.app.model.PriceSurcharge;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

@Data
public class EstimateRateResponse {
    @lombok.Data
    public static class FeeDetail {
        private int dryIce;
        private int cod;
        private int insurance;
        private double fuel;
        @ApiModelProperty("基础费率")
        private BigDecimal baseRate;
    }

    private String result;
    private String errorCode;
    private String message;
    private String zhMessage;
    private String errorType;
    private Data data;

    @lombok.Data
    @NoArgsConstructor
    public static class Data {
        @ApiModelProperty("总汇率")
        private BigDecimal rate;
        @ApiModelProperty("总汇率明细")
        private FeeDetail feeDetail;
        @ApiModelProperty("原始汇率")
        private BigDecimal originRate;
        @ApiModelProperty("原始汇率明细")
        private FeeDetail originFeeDetail;
        @ApiModelProperty("运输时间")
        private String deliveryTime;
        @ApiModelProperty("运输服务code")
        private String carrierServiceCode;
        @ApiModelProperty("运输服务名")
        private String carrierServiceName;
        @ApiModelProperty("运输服务ID")
        private Integer channelId;
        @ApiModelProperty("承运商code")
        private String carrierCode;
        @ApiModelProperty("承运商名字")
        private String carrierName;

        private String serviceCode;
        //附加费
        private List<PriceSurcharge> surcharge;

        private String packageTypeCode;

        private String packageTypeName;

        private String messages;

        public Data(BigDecimal rate, String carrierServiceCode, String carrierServiceName, String carrierCode, String carrierName) {
            this.rate = rate;
            this.carrierServiceCode = carrierServiceCode;
            this.carrierServiceName = carrierServiceName;
            this.carrierCode = carrierCode;
            this.carrierName = carrierName;
        }
    }
}
